#include "tree_structs.h"
#define NULL 0

void initStmt(struct StmtInfo* stmt) {
    stmt->pExprLeft=NULL;
    stmt->pExprMid=NULL;
    stmt->pExprRight=NULL;
    stmt->pIfStmt=NULL;
    stmt->pStmtBlock=NULL;
    stmt->pStmtLeft=NULL;
    stmt->pStmtNext=NULL;
    stmt->pStmtRight=NULL;
    stmt->pSwitchStmt=NULL;
    stmt->VarnameLeft=NULL;
    stmt->VarnameRight=NULL;
}

void initExpr(struct ExprInfo* expr) {
    expr->args=NULL;
    expr->arrElements=NULL; 
    expr->const_char=NULL;
    expr->funcname=NULL;
    expr->left=NULL;
    expr->mid=NULL;
    expr->right=NULL;
    expr->pNext=NULL;
    expr->varname=NULL;
    expr->fieldname=NULL;
    expr->localTableIndex=-1;
    expr->constTableIndex=-1;
}
void initIfStmt(struct IfStmtInfo* ifstmt) {
    ifstmt->pExpr=NULL;
    ifstmt->pBlock=NULL;
    ifstmt->pStmtLeft=NULL;
    ifstmt->pStmtRight=NULL;
    ifstmt->pNext=NULL;
}
void initElseIf(struct ElseIfInfo* elseifstmt){
    elseifstmt->pExpr=NULL;
    elseifstmt->pBlock=NULL;
    elseifstmt->pStmtLeft=NULL;
    elseifstmt->pStmtRight=NULL;
    elseifstmt->pNext=NULL;
}
